package com.itheima.controller;

import com.itheima.domain.Patient;
import com.itheima.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/product")
public class ProductController {
    @Autowired
    private ProductService productService;

    @RequestMapping("/save")
    public String save(Patient patient){
        productService.save(patient);
        return "redirect:/department/findAll";
    }
}
